﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace DownloadBook.Server{
    class DownloadContentManager{
        public static readonly List<DownloadContent> list = new List<DownloadContent>();
        private static DownloadContentManager s_instance;
        public static DownloadContentManager instance{
            get{
                if (s_instance == null) {
                    s_instance = new DownloadContentManager();
                }
                return s_instance;
            }
        }

        public void Start(DownloadContent downloadContent) {
            list.Add(downloadContent);
            Thread thread = new Thread(new ThreadStart(downloadContent.Start));
            thread.IsBackground = true;
            thread.Start();
        }

        

        
    }
}
